<template>
    <CommonContainer title="合同模版">
        <template v-slot:rightInfo v-if="detailInfo.contractContent">
            <el-button type="text" @click="downloadContractContent">下载模版</el-button>
        </template>
        <div>
            <el-descriptions v-if="detailInfo.contractAnnex">
                <el-descriptions-item label="合同附件" :span="3">
                    <image-common disabled :up-type="2" v-model="detailInfo.contractAnnex"></image-common>
                </el-descriptions-item>
            </el-descriptions>
            <tinymce-editor :toolbar="false" disabled v-model="detailInfo.contractContent"></tinymce-editor>
        </div>
    </CommonContainer>
</template>

<script>
import TinymceEditor from "@/components/TinymceEditor/index.vue";

export default {
    components: {TinymceEditor},
    props: {
        detailInfo: {
            type: Object,
            default: {}
        }
    },
    data() {
        return {}
    },
    computed: {},
    methods: {
        downloadContractContent() {
            this.$download.contractTemplate(this.detailInfo.id);
        },
    },
    mounted() {
    },

}
</script>

<style lang="scss" scoped>
</style>
